package com.sky.wsp.rabbitmq.consumer;

import com.sky.wsp.rabbitmq.exchange.TopicExchangeConfig;
import com.sky.wsp.rabbitmq.po.MqMessage;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


@Component
public class TopicConsumer1 {
    @RabbitListener(queues = TopicExchangeConfig.QUEUE_NAME_1)
    public void displayTopic(MqMessage msg) {
        System.out.println("<==Topic消费者1,监听routingKey=" + TopicExchangeConfig.ROUTING_KEY_1 +", 收到消息" + msg.toString());
    }
}
